{ INFORMATICS.MCCME.RU
  Problem statement: http://informatics.mccme.ru/moodle/mod/statements/view3.php?chapterid=1045
  Verdict: Accepted
}
var i,n,k,t:longint; res:int64; a:array[1..100001] of longint;
procedure swap(var a,b:longint);
var t:longint;
begin
t:=a;
a:=b;
b:=t;
end;
procedure siftup(i:longint);
var t:longint;
begin
while (i>1) and (a[i div 2]>a[i]) do begin
      swap(a[i],a[i div 2]);
      i:=i div 2;
end;
end;
procedure siftdown(i:longint);
var j,t:longint;
begin
while (2*i<=n) do begin
      j:=i;
      if (a[2*i]<a[j]) then j:=2*i;
      if (2*i+1<=n) and (a[2*i+1]<a[j]) then j:=2*i+1;
      if i=j then break;
      swap(a[i],a[j]);
      i:=j;
end;
end;
function exmin:longint;
begin
exmin:=a[1];
a[1]:=a[n];
dec(n);
siftdown(1);
end;
begin
assign(input,'input.txt');
assign(output,'output.txt');
reset(input);
rewrite(output);
readln(n);
for i:=1 to n do begin
    read(a[i]);
    siftup(i);
end;
res:=0;
t:=n;
for i:=1 to t-1 do begin
    k:=exmin+exmin;
    inc(res,k);
    inc(n);
    a[n]:=k;
    siftup(n);
end;
writeln((res*0.05):0:2);
end.